/*
 *  Copyright (C) 2011 Hatsites
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package org.myorg.ctm.etk.gui.swg.display.create.item.panel;

import javax.swing.JLabel;
import org.myorg.shr.gui.swg.display.labelized.LbzTxfAbs;
import org.myorg.shr.gui.swg.display.labelized.LbzTxfVrt;
import org.myorg.shr.gui.swg.display.panel.PnlAbs;

/**
 *
 * @author Hatsites
 *
 * email: Hatsites_AT_gmail.com
 * ... please remove "_AT_" from the above string to get the right email address
 */

public class PnlEmail extends PnlAbs{
    public PnlEmail(){
        this._lblTravail_ = new JLabel("Travail :");
        this._lblPersonnel_ = new JLabel("Personnel :");
        this._txfPersoMail_ = new LbzTxfVrt("Mail", 100);
        this._txfTravailMail_ = new LbzTxfVrt("Mail", 100);
        this._txfPersoFixe_ = new LbzTxfVrt("Tel Fixe", 100);
        this._txfTravailFixe_ = new LbzTxfVrt("Tel Fixe", 100);
        this._txfPersoPortable_ = new LbzTxfVrt("Tel Portable", 100);
        this._txfTravailPortable_ = new LbzTxfVrt("Tel Portable", 100);
    }

    public boolean init() {
        if(!this._txfPersoMail_.init()){
            return false;
        }
        if(!this._txfTravailMail_.init()){
            return false;
        }
        if(!this._txfPersoFixe_.init()){
            return false;
        }
        if(!this._txfTravailFixe_.init()){
            return false;
        }
        if(!this._txfPersoPortable_.init()){
            return false;
        }
        if(!this._txfTravailPortable_.init()){
            return false;
        }

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(this._lblPersonnel_)
            .addComponent(this._txfPersoMail_)
            .addComponent(this._txfPersoFixe_)
            .addComponent(this._txfPersoPortable_)

            .addComponent(this._lblTravail_)
            .addComponent(this._txfTravailMail_)
            .addComponent(this._txfTravailFixe_)
            .addComponent(this._txfTravailPortable_)

            );
        layout.setVerticalGroup(
            layout.createSequentialGroup()
                        .addComponent(this._lblPersonnel_)
            .addComponent(this._txfPersoMail_)
            .addComponent(this._txfPersoFixe_)
            .addComponent(this._txfPersoPortable_)

            .addComponent(this._lblTravail_)
            .addComponent(this._txfTravailMail_)
            .addComponent(this._txfTravailFixe_)
            .addComponent(this._txfTravailPortable_)
        );
        return true;
    }

    public void destroy() {
        return;
    }
    public String getTravailMail() {
        return this._txfTravailMail_.getText();
    }
    public String getTravailFixe() {
        return this._txfTravailFixe_.getText();
    }
    public String getTravailPortable() {
        return this._txfTravailPortable_.getText();
    }
    public String getPersonnelMail() {
        return this._txfPersoMail_.getText();
    }
    public String getPersonnelFixe() {
        return this._txfPersoFixe_.getText();
    }
    public String getPersonnePortable() {
        return this._txfPersoPortable_.getText();
    }


    private JLabel _lblTravail_;
    private JLabel _lblPersonnel_;
    private LbzTxfAbs _txfPersoMail_;
    private LbzTxfAbs _txfPersoFixe_;
    private LbzTxfAbs _txfPersoPortable_;
    private LbzTxfAbs _txfTravailMail_;
    private LbzTxfAbs _txfTravailFixe_;
    private LbzTxfAbs _txfTravailPortable_;




}
